<?
    include "./common.php" ;
    $arr = [] ;
    $username = $_POST['username'] ; 
    $pwd = $_POST['password'] ;
    $sql = "SELECT * FROM `users` WHERE userName = '{$username}' AND `passWord` = '{$pwd}'" ;
    $res = mysqli_query($link,$sql);
    if( $one = mysqli_fetch_assoc($res) ){
        $arr['status'] = 1 ;
        $arr['info'] =  '登录成功！' ;
    } else {
        $arr['status'] = 0 ;
        $arr['info'] =  '用户名或密码错误！' ;
    }
    echo json_encode($arr);
?>